package book;

/**
 * Created by xiebang
 * Description
 * User:小谢
 * Date:2021-12-23
 * Time:18:34
 */
public class BookList {
    private int usedSize;

    public int getUsedSize() {
        return usedSize;
    }

    public void setUsedSize(int usedSize) {
        this.usedSize = usedSize;
    }



    private Book[] books = new Book[10];
    public BookList(){
        this.books[0] = new Book("三国演义","罗贯中",99,"小说");
        this.books[1] = new Book("西游记","吴承恩",199,"小说");
        this.books[2] = new Book("红楼梦","曹雪芹",299,"小说");
        this.usedSize = 3;

    }
    public Book getBook(int i){
        return books[i];
    }

    public void setBooks(int pos,Book book){
        books[pos] = book;
        this.usedSize++;
    }
}
